package 作业;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

public class 练习2 {
    public static void main(String[] args) {
        Set set=new HashSet();
        while (true){
            double random=(double) (Math.random()*101);
            set.add(random);
            if (set.size()==10){
                break;
            }
        }
        double max=0;
        double min=100;
        Iterator integer=set.iterator();
        while (integer.hasNext()){
            double c=(double)integer.next();
            System.out.println(c+"\t");
            if (c>max){
                max=c;
            }
            if (c<min){
                min=c;
            }
        }
        System.out.println();
        System.out.println(max);
        System.out.println(min);
    }
}
